'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  //登录
  router.post("/api/login", controller.login.login)
  //注册
  router.post("/api/register", controller.login.register)



  //房源
  router.get('/api/housingList', controller.home.housingList);
  //房源搜索
  router.post('/api/roomsearch', controller.home.roomsearch);
  //房源删除
  router.post('/api/tableDataDel', controller.home.tableDataDel);
  //房源管理数据修改
  router.post('/api/housingEdit', controller.home.housingEdit);
  //房源管理数据添加
  router.post('/api/housingAdd', controller.home.housingAdd);
  //三级联动赛选
  router.post('/api/three', controller.home.three);


  //团购
  router.get('/api/tableData2', controller.home.tableData2);
  //团购赛选
  router.post('/api/tgtype', controller.home.tgtype);
  //团购搜索
  router.post('/api/tgsearch', controller.home.tgsearch);
  //团购删除
  router.post('/api/tableDataDel2', controller.home.tableDataDel2);



  //直播
  router.get('/api/liveList', controller.home.liveList);
  //直播赛选
  router.post('/api/livetype', controller.home.livetype);
  //直播搜索
  router.post('/api/livesearch', controller.home.livesearch);
  //直播详情
  router.post('/api/Detail', controller.home.Detail);
};
